Imports System.Collections

Friend Class AuditConnection
     Private _ConnectionName As String
     Private _ConnectionGUID As String
     Private _ConnectionString As String
     Private _ConnectionType As String

     Public Sub New(ByVal ConnectionName As String, ByVal ConnectionGUID As String, ByVal ConnectionString As String, ByVal ConnectionType As String)
          _ConnectionName = ConnectionName.Trim
          _ConnectionGUID = ConnectionGUID.Trim
          _ConnectionString = ConnectionString.Trim
          _ConnectionType = ConnectionType.Trim
     End Sub

     Public ReadOnly Property ConnectionName() As String
          Get
               Return CType(_ConnectionName, String)
          End Get
     End Property

     Public ReadOnly Property ConnectionGUID() As String
          Get
               Return CType(_ConnectionGUID, String)
          End Get
     End Property

     Public ReadOnly Property ConnectionString() As String
          Get
               Return CType(_ConnectionString, String)
          End Get
     End Property

     Public ReadOnly Property ConnectionType() As String
          Get
               Return CType(_ConnectionType, String)
          End Get
     End Property
End Class

Friend Class AuditConnections
     Inherits CollectionBase
     'Implements ICloneable

     Public Sub New()
          List.Clear()
     End Sub

     Public Sub Add(ByVal Connection As AuditConnection)
          List.Add(Connection)
     End Sub

     Public Sub Add(ByVal ConnectionName As String, ByVal ConnectionGUID As String, ByVal ConnectionString As String, ByVal ConnectionType As String)
          List.Add(New AuditConnection(ConnectionName, ConnectionGUID, ConnectionString, ConnectionType))
     End Sub

     Default Public Property Item(ByVal Index As Integer) As AuditConnection
          Get
               Return CType(List.Item(Index), AuditConnection)
          End Get
          Set(ByVal Value As AuditConnection)
               List.Item(Index) = Value
          End Set
     End Property

     'Public Function ShallowCopy() As AuditConnections
     '     Me.MemberwiseClone()
     'End Function

     'Public Function Clone() As Object Implements System.ICloneable.Clone
     '     Dim ACs As AuditConnections = CType(Me.MemberwiseClone, AuditConnections)
     '     Dim AC As AuditConnection

     '     For Each AC In Me.List
     '          ACs.Add(AC)
     '     Next

     '     Return ACs
     'End Function
End Class
